<%@ page import="com.lbw.model.Student" %><%--
  Created by IntelliJ IDEA.
  User: lbw
  Date: 2021/4/1
  Time: 9:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>WorkerInfo</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style.css">

</head>
<body>

<table>
    <caption>Work Information</caption>
    <thead>
    <tr>
        <th scope="col">Index</th>
        <th scope="col">Name</th>
        <th scope="col">WorkerId</th>
        <th scope="col">Age</th>
        <th scope="col">Job</th>

    </tr>
    </thead>
    <tbody>
    <c:forEach items="${requestScope.workers}" var="worker">
        <tr>
            <td>${worker.index}</td>
            <td scope="row">${worker.name}
            </td>
            <td>${worker.workerId}
            </td>
            <td>${worker.age}
            </td>
            <c:if test="${worker.job eq 'finance'}">
                <td>财务</td>
            </c:if>
            <c:if test="${ worker.job eq 'engineer'}">
                <td>工程师</td>
            </c:if>
        </tr>
    </c:forEach>

    </tbody>
</table>

</body>
</html>

